Feature Management Adapter

Feature management adapter can be used to handle various tasks and activities related to feature development and management in the Calibo Accelerate platform. Examples of such tasks include tracking and monitoring user activities associated with features. This adapter offers a means to connect, manage, and oversee these feature-related activities.

Usage

The primary purpose of this adapter is to facilitate the mapping and management of various tasks and activities related to feature development. This encompasses a wide range of activities, including user work on features, tracking feature completion timelines, setting feature milestones, allocating resources for features, assigning users to specific features, and more.

List of requirements

The feature management adapter must meet the following requirements:

  • One-to-Many Mapping

    The component should support a one-to-many mapping relationship between features. This means that multiple tasks or activities can be associated with a single feature, allowing for flexibility and granularity in task management.

  • Data Integrity

    It should serve as the authoritative source for all mappings and validations related to feature development tasks. This ensures that the component's data is accurate and up-to-date, promoting consistency and reliability.

  • Admin Privileges

    Administrative privileges should be provided to perform necessary activities within the component.

  • Secure Connection with Backend Systems and Credential Handling

    The component should establish secure connections with backend systems, and any sensitive credentials required for authentication should be securely stored in a secrets management tool as a security best practice.

APIs and Interfaces

Copy
public interface ElabFeatureService {

   boolean testConnection();

   User getUserContext();

   Object createAgileTicket(TicketRequestBean request);

   Object getTicket(String key);

   Object getTicket(List<String> Labels);

   boolean deleteTicket(String key);

   Object updateAgileTicket(TicketRequestBean request);

}

The interfaces to be implemented and the associated classes are as follows:

  • TestConnection()

    • Usage: This interface method is usedto test the connection of the component.

    • Input: To establish the connection, the interface retrieves credentials (username and password) securely from the secrets management tool.

    • Output: It provides the status of the connection, indicating whether the connection was successful or not.

  • GetUserContext()

    • Usage: This interface method is usedto obtain the context of the user at the component level.

    • Input: The authentication token for the user is passed to the interface, which is then used to fetch user details from the component.

    • Output: It returns the user context, which includes various user-related attributes such as self, name, key, accountId, avatarUrls, displayName, active status, timeZone, and accountType. This context provides comprehensive information about the user.

      Copy
      public class User {

         @JsonProperty("self")
         private String self;
         @JsonProperty("name")
         private String name;
         @JsonProperty("key")
         private String key;
         @JsonProperty("accountId")
         private String accountId;
         @JsonProperty("avatarUrls")
         private AvatarUrls avatarUrls;
         @JsonProperty("displayName")
         private String displayName;
         @JsonProperty("active")
         private Boolean active;
         @JsonProperty("timeZone")
         private String timeZone;
         @JsonProperty("accountType")
         private String accountType;

      }
  • CreateAgileTicket(TicketRequestBean request)

    • Usage: This interface method is usedto create new agile tickets.
    • Input: It takes a request object (TicketRequestBean) as input, containing details such as project name, summary, description, issue type, parent key, assignee, and labels.

      Copy
      public class TicketRequestBean {

         private String projectName;

         @NotNull
         private String summary;

         private String description;

         @NotNull
         private String issueType;

         private String parentKey;

         private String assignee;

         private List<String> labels;
      }
    • Output: Java object as a response.

  • GetTicket(String key)

    • Usage: This interface method is usedto retrieve a specific ticket based on its ticket ID (key).

    • Input: It requires the key (ID) of the ticket.

    • Output: It returns Java object as a response.

  • GetTicket(List<String> Labels)

    • Usage: This interface method is usedto retrieve tickets based on a list of labels associated with them.

    • Input: It takes a list of labels as input.

    • Output: It returns Java object as a response.

  • DeleteTicket(String key)

    • Usage: This interface method is usedto delete a ticket based on its ticket ID (key).

    • Input: It requires the key (ID) of the ticket to be deleted.

    • Output: It returns a Boolean value indicating whether the ticket was successfully deleted.

  • UpdateAgileTicket(TicketRequestBean request)

    • Usage: This interface method is usedto update existing agile tickets.

    • Input: Similar to the CreateAgileTicket method, it takes a request object (TicketRequestBean) as input, containing details about the changes to be made to the ticket.

      Copy
      public class TicketRequestBean {

         private String projectName;

         @NotNull
         private String summary;

         private String description;

         @NotNull
         private String issueType;

         private String parentKey;

         private String assignee;

         private List<String> labels;
      }
    • Output: It returns Java object as a response.

The following APIs consume the interfaces that are listed earlier in this topic:

  • Feature Creation

  • Feature Updation

  • Feature User Assignment

  • Feature Deletion

Data Models and Formats

The feature management adapter utilizes JSON or XML for communication between different parts of the system. JSON and XML are structured data formats commonly used for data interchange.

Data Model for Storing Feature Information

Here is the structure of the data model that is used to store information related to features.

Copy
public class FeatureDetailsEntity extends Auditable {

   @Id
   @GeneratedValue(generator = "uuid")
   @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
   @Column(name = "id")
   private String id;

   @Column(name = "feature_id")
   private String featureId;

   @Column(name = "feature_name")
   private String featureName;

   @Column(name = "project_id")
   private String projectId;

   @Column(name = "tool_name")
   private String toolName;

   @Column(name = "description")
   private String description;

   @Enumerated(EnumType.STRING)
   @Column(name = "status")
   private StatusEnum status = StatusEnum.ACTIVE;

   @Column(name = "mapping_done")
   private Boolean mappingDone;

}

Data Model for Storing User Mapping

Here is the structure of the data model that is used to store information related to the mapping of users to agile features.

Copy
public class UserAgileMappingEntity extends Auditable {

   @Id
   @GeneratedValue(generator = "uuid")
   @GenericGenerator(name = "uuid", strategy = "org.hibernate.id.UUIDGenerator")
   @Column(name = "id")
   private String id;

   @Column(name = "user_email_id", nullable = false)
   private String userEmailId;

   @Column(name = "agile_user_id", nullable = false)
   private String agileUserId;

   @Column(name = "agile_tool", nullable = false)
   private String agileTool;

   @Column(name = "agile_feature_key", nullable = false)
   private String agileFeatureKey;

   @Column(name = "agile_user_role_id", nullable = false)
   private String agileUserRoleId;

   @Column(name = "project_id", nullable = false)
   private String projectId;

}

 

Related Topics Link IconRecommended Topics

What's next? Release Train and Release Management Adapter